#pragma once

#include <HpsFramework/MemoryPool.hpp>
#include <HpsFramework/Server.hpp>
#include <HpsFramework/Client.hpp>

#define MAX_CLIENTS		100

using namespace HpsFramework::Network;

class ClientContext
	: public Client
{

	HPS_MEMORYPOOL_SET(ClientContext)

public:
	ClientContext ( Socket& sock, Server* server, Client::IdType idx )
		: Client(sock, server, idx)
	{
	}

	~ClientContext(void)
	{
	}
	
	virtual void onConnect ()
	{
	}

	virtual void onDisconnect ()
	{
	}

	virtual size onReceive ( byteptr buffer, size length )
	{
		return this->getServer()->getProtocolHandler()->processBuffer ( this, buffer, length );
	}

};